import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useMarkStore = defineStore('mark',
                ()=>{
                    const mark = ref('')
                    const setMark = (val)=>{
                        mark.value = val
                    }
                    return {mark,setMark}
                },
                 //持久化存储信息
        //persist:true不适合小程序端
        {persist:{
            storage :{
                getItem(key){
                    return uni.getStorageSync(key)
                },
                setItem(key,value){
                    uni.setStorageSync(key,value)
                },
            }
        }
    }
)